Integrand size = 35, antiderivative size = 96 \[ \int \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {2 \sqrt {a} B \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{d}+\frac {2 a A \sin (c+d x)}{d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \]
[Out]
Time = 0.33 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {3034, 4100, 3886, 221} \[ \int \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {2 a A \sin (c+d x)}{d \sqrt {\cos (c+d x)} \sqrt {a \sec (c+d x)+a}}+\frac {2 \sqrt {a} B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d} \]
[In]
[Out]
Rule 221
Rule 3034
Rule 3886
Rule 4100
Rubi steps \begin{align*} \text {integral}& = \left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x))}{\sqrt {\sec (c+d x)}} \, dx \\ & = \frac {2 a A \sin (c+d x)}{d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}+\left (B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \sqrt {\sec (c+d x)} \sqrt {a+a \sec (c+d x)} \, dx \\ & = \frac {2 a A \sin (c+d x)}{d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}}-\frac {\left (2 B \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {x^2}{a}}} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d} \\ & = \frac {2 \sqrt {a} B \text {arcsinh}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{d}+\frac {2 a A \sin (c+d x)}{d \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)}} \\ \end{align*}
Time = 0.60 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.98 \[ \int \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {2 \sqrt {\cos (c+d x)} \left (A \sqrt {1-\sec (c+d x)}-B \arcsin \left (\sqrt {\sec (c+d x)}\right ) \sqrt {\sec (c+d x)}\right ) \sqrt {a (1+\sec (c+d x))} \tan \left (\frac {1}{2} (c+d x)\right )}{d \sqrt {1-\sec (c+d x)}} \]
[In]
[Out]
Time = 7.18 (sec) , antiderivative size = 163, normalized size of antiderivative = 1.70
method | result | size |
default | \(\frac {\sqrt {a \left (1+\sec \left (d x +c \right )\right )}\, \sqrt {\cos \left (d x +c \right )}\, \left (2 A \sin \left (d x +c \right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}-B \arctan \left (\frac {-\cos \left (d x +c \right )+\sin \left (d x +c \right )-1}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )-B \arctan \left (\frac {\cos \left (d x +c \right )+\sin \left (d x +c \right )+1}{2 \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\right )\right )}{d \left (\cos \left (d x +c \right )+1\right ) \sqrt {-\frac {1}{\cos \left (d x +c \right )+1}}}\) | \(163\) |
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 298, normalized size of antiderivative = 3.10 \[ \int \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\left [\frac {4 \, A \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + {\left (B \cos \left (d x + c\right ) + B\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 4 \, \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} {\left (\cos \left (d x + c\right ) - 2\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) - 7 \, a \cos \left (d x + c\right )^{2} + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right )}{2 \, {\left (d \cos \left (d x + c\right ) + d\right )}}, \frac {2 \, A \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + {\left (B \cos \left (d x + c\right ) + B\right )} \sqrt {-a} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right )}{a \cos \left (d x + c\right )^{2} - a \cos \left (d x + c\right ) - 2 \, a}\right )}{d \cos \left (d x + c\right ) + d}\right ] \]
[In]
[Out]
\[ \int \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \left (A + B \sec {\left (c + d x \right )}\right ) \sqrt {\cos {\left (c + d x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 262 vs. \(2 (82) = 164\).
Time = 0.41 (sec) , antiderivative size = 262, normalized size of antiderivative = 2.73 \[ \int \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\frac {4 \, \sqrt {2} A \sqrt {a} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + B \sqrt {a} {\left (\log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) + \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right ) - \log \left (2 \, \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 2 \, \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 2 \, \sqrt {2} \cos \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 2 \, \sqrt {2} \sin \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 2\right )\right )}}{2 \, d} \]
[In]
[Out]
\[ \int \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int { {\left (B \sec \left (d x + c\right ) + A\right )} \sqrt {a \sec \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )} \,d x } \]
[In]
[Out]
Timed out. \[ \int \sqrt {\cos (c+d x)} \sqrt {a+a \sec (c+d x)} (A+B \sec (c+d x)) \, dx=\int \sqrt {\cos \left (c+d\,x\right )}\,\left (A+\frac {B}{\cos \left (c+d\,x\right )}\right )\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}} \,d x \]
[In]
[Out]